From 8830a1a1ad09e4ed6bb67ef10dafe245fac3b952 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 11 Dec 2016 04:13:22 +0100 Subject: [PATCH] gtk: Remove gtk_snapshot_append() It does not make sense to append an empty container node. Those should only be push()'d. --- docs/reference/gtk/gtk4-sections.txt | 1 - gtk/gtksnapshot.c | 47 ---------------------------- gtk/gtksnapshot.h | 5 --- 3 files changed, 53 deletions(-) diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 3b6ba53464..191363ae5d 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -4461,7 +4461,6 @@ gtk_snapshot_set_transform gtk_snapshot_transform gtk_snapshot_translate_2d gtk_snapshot_append_node -gtk_snapshot_append gtk_snapshot_append_cairo_node gtk_snapshot_clips_rect gtk_snapshot_render_background diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 3a57d44ca0..803526bc56 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -336,53 +336,6 @@ gtk_snapshot_append_node (GtkSnapshot *snapshot, } } -/** - * gtk_snapshot_append: - * @snapshot: a #GtkSnapshot - * @bounds: the bounds for the new node - * @name: (transfer none): a printf() style format string for the name for the new node - * @...: arguments to insert into the format string - * - * Creates a new render node and appends it to the current render - * node of @snapshot, without changing the current node. - * - * Since: 3.90 - * - * Returns: (transfer full): the newly created #GskRenderNode - */ -GskRenderNode * -gtk_snapshot_append (GtkSnapshot *snapshot, - const graphene_rect_t *bounds, - const char *name, - ...) -{ - GskRenderNode *node; - - g_return_val_if_fail (snapshot != NULL, NULL); - g_return_val_if_fail (bounds != NULL, NULL); - - node = gsk_renderer_create_render_node (snapshot->renderer); - gsk_render_node_set_bounds (node, bounds); - - if (name) - { - va_list args; - char *str; - - va_start (args, name); - str = g_strdup_vprintf (name, args); - va_end (args); - - gsk_render_node_set_name (node, str); - - g_free (str); - } - - gtk_snapshot_append_node (snapshot, node); - - return node; -} - /** * gtk_snapshot_append_cairo_node: * @snapshot: a #GtkSnapshot diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h index dbf8b76293..d5201064ec 100644 --- a/gtk/gtksnapshot.h +++ b/gtk/gtksnapshot.h @@ -65,11 +65,6 @@ GDK_AVAILABLE_IN_3_90 void gtk_snapshot_append_node (GtkSnapshot *snapshot, GskRenderNode *node); GDK_AVAILABLE_IN_3_90 -GskRenderNode * gtk_snapshot_append (GtkSnapshot *snapshot, - const graphene_rect_t *bounds, - const char *name, - ...) G_GNUC_PRINTF(3, 4); -GDK_AVAILABLE_IN_3_90 cairo_t * gtk_snapshot_append_cairo_node (GtkSnapshot *snapshot, const graphene_rect_t *bounds, const char *name, -- 2.30.2